package net.comm.group.web.form;

import net.comm.page.PageCtr;

import org.apache.struts.action.*;
import org.apache.struts.upload.FormFile;


public class GFollForumForm extends ActionForm {

	private static final long serialVersionUID = 1L;
	private static final String KEY_SPLIT = "#,##,#,#,#";

	private int  QryGroupID;	//群组ID
	private int  QryVillageID;	//社区ID
	private int  QryGForumID;	//帖子序号

	private int  GFollowID;		//
	private int  	GupFollID;	//被跟帖序号
	private int  GForumID;		//帖子序号
	private int  GroupID;		//群组ID
	private String  Title;		//
	private String  Content;	//发贴/跟贴内容
	private int  	FileID;		//
	private int  UpUserID;		//被跟帖会员ID
	private int  UserID;		//
	private String  IP;			//
	private String  Mtime;		//
	
	private FormFile  Filepath;		//
			
	private String action = "";
	
	public GFollForumForm() {
		super();
		// TODO Auto-generated constructor stub
		QryGroupID = 0;
		QryGForumID = 0;
		QryVillageID = 0;
		
		GFollowID = 0;	//
		GupFollID = 0;	//
		GForumID = 0;	//
		GroupID = 0;	//
		Title = "";		//
		Content = "";	//
		FileID = 0;		//
		UpUserID = 0;		//
		UserID = 0;		//
		IP = "";		//
		Mtime = "";		//	
		Filepath = null;
	}

	/**
	 * 查询当前页主键值串
	 */
	private String key = "";

	/**
	 * 查询上上页主键值串
	 */
	private String lastKey = "";
	

	/**
	 * 分页控制对象
	 */
	private PageCtr page;
	



	public PageCtr getPage() {
		return page;
	}

	public void setPage(PageCtr page) {
		this.page = page;
	}
	
	/**
	 * @param key the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String[] array) {
		if(key != null && key.trim().length() > 0) {
			key = "";
		}
		
		StringBuffer keyBuff = new StringBuffer();
		for (int i = 0; i < array.length; i++) 
		{
			/**
			 * 防止空字符串引起的split方法异常
			 */
			if(array[i] == null || array[i].length() == 0) {
				keyBuff.append(" ");
			} else {
				keyBuff.append(array[i]);
			}
			
			keyBuff.append(KEY_SPLIT);
		}
		
		key = keyBuff.toString();		
	}
	
	/**
	 * 获取lastKey值
	 * @return
	 */
	public String[] lastKey()
	{
		if(lastKey == null || lastKey.trim().length() == 0) {
			return null;
		}
		
		return lastKey.split(KEY_SPLIT);
	}
	
	public String getLastKey() {
		return lastKey;
	}

	public void setLastKey(String lastKey) {
		this.lastKey = lastKey;
	}	

	public String getAction() {
		return action;
	}
	public void setAction(String action) {
		this.action = action;
	}

	public static String getKEY_SPLIT() {
		return KEY_SPLIT;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public String getTitle() {
		return Title;
	}


	public String getContent() {
		return Content;
	}



	public int getGupFollID() {
		return GupFollID;
	}

	public void setGupFollID(int gupFollID) {
		GupFollID = gupFollID;
	}



	public void setTitle(String title) {
		Title = title;
	}


	public void setContent(String content) {
		Content = content;
	}


	public int getFileID() {
		return FileID;
	}

	public void setFileID(int fileID) {
		FileID = fileID;
	}


	public String getIP() {
		return IP;
	}


	public void setIP(String ip) {
		IP = ip;
	}



	public int getQryGroupID() {
		return QryGroupID;
	}

	public int getQryGForumID() {
		return QryGForumID;
	}

	public int getGFollowID() {
		return GFollowID;
	}

	public int getGForumID() {
		return GForumID;
	}

	public int getGroupID() {
		return GroupID;
	}

	public int getUpUserID() {
		return UpUserID;
	}

	public int getUserID() {
		return UserID;
	}

	public String getMtime() {
		return Mtime;
	}

	public void setQryGroupID(int qryGroupID) {
		QryGroupID = qryGroupID;
	}

	public void setQryGForumID(int qryGForumID) {
		QryGForumID = qryGForumID;
	}

	public void setGFollowID(int followID) {
		GFollowID = followID;
	}

	public void setGForumID(int forumID) {
		GForumID = forumID;
	}

	public void setGroupID(int groupID) {
		GroupID = groupID;
	}

	public void setUpUserID(int upUserID) {
		UpUserID = upUserID;
	}

	public void setUserID(int userID) {
		UserID = userID;
	}

	public void setMtime(String mtime) {
		Mtime = mtime;
	}

	public FormFile getFilepath() {
		return Filepath;
	}

	public void setFilepath(FormFile filepath) {
		Filepath = filepath;
	}

	public int getQryVillageID() {
		return QryVillageID;
	}

	public void setQryVillageID(int qryVillageID) {
		QryVillageID = qryVillageID;
	}

	
}